home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 1 / PC Actual CD 01.iso / share / dos / progr / svga2.arj / NOTES64K.SVG < prev    next >
Encoding:
Text File  |  1993-05-24  |  2.8 KB  |  83 lines

  1. SuperVGA 65536 BGI driver 
  2. Version 1.1
  3. May 21, 1993
  4.  
  5. Revisions:
  6.     1.0 - April 10, 1993
  7.  
  8. This is the newest version of my SuperVGA 65536 BGI driver.  All functions
  9. have been implemented, but there may still be bugs.
  10.  
  11. Note:  Palette functions, and the mouse cursor will not work with this driver.
  12.  
  13.   Using the HiColor driver:
  14.  
  15.     Implementing the 65536 color driver involved several hacks, as
  16.     the BGI interface only supports 8-bit color values, but the driver
  17.     needed support for 16-bit color values.  The procedures that needed
  18.     to be changed were those that accepted color values, (SetColor,
  19.     SetFillStyle, SetFillPattern, PutPixel and Floodfill)  and those 
  20.     that return color values (GetColor and GetPixel).
  21.     As the HiColor modes do not support palettes, I decided to use
  22.     the SetRgbPalette call to set colors, as it accepts values for the 
  23.     R,G and B components of the color.
  24.  
  25.     The format of a pixel in the HiColor modes is:
  26.         -Byte 1- -Byte 0-
  27.         RRRRRGGG GGGBBBBB
  28.  
  29.     Several new functions are defined to make the color selection easier.
  30.     In addition, the macro RGB(rv,gv,bv) has been defined.  It packs
  31.     the R, G and B values into the format described above and returns the
  32.     combined color.
  33.  
  34.     * RealDrawColor(); - Sets the current drawing color.
  35.       Usage:
  36.         setcolor(RealDrawColor(RGB(rval,gval,bval)); - HiColor modes
  37.         setcolor(RealDrawColor(cval)); - (suggested for any other driver)
  38.  
  39.     * RealFillColor(); - Sets the current fill color.
  40.       Usage:
  41.         setfillstyle(fillstyle,RealFillColor(RGB(rval,gval,bval)));
  42.         setfillstyle(fillstyle,RealFillColor(cval));
  43.         setfillpattern(fillpat,RealFillColor(RGB(rval,gval,bval)));
  44.         setfillpattern(fillpat,RealFillColor(cval));
  45.  
  46.     * RealColor(); - For putpixel, sets the color of the pixel
  47.                - For floodfill, sets the color of the boundary
  48.         putpixel(x,y,RealColor(RGB(rval,gval,bval)));
  49.         putpixel(x,y,RealColor(cval));
  50.         floodfill(x,y,RealColor(RGB(rval,gval,bval)));
  51.         floodfill(x,y,RealColor(cval));
  52.  
  53.     * GetPixel normally only returns an 8-bit value.  However, the
  54.       value returned from the BGI driver is a 16-bit value in DX (the 
  55.       BGI kernel loads the value into AX and clears the upper 8 bits),
  56.       so to read the value of a pixel:
  57.  
  58.       In Pascal:
  59.         Color := getpixel(x,y);
  60.         inline($89/$56/<Color);  (* Loads 16-bit color value *)
  61.  
  62.       In C:
  63.         Color = getpixel(x,y);
  64.         Color = _DX;
  65.       
  66.     * Paging information:
  67.  
  68.       Mode        Paging?        # of pages (with 1024k)
  69.       320x200    yes        8
  70.       640x350    yes        2
  71.       640x400    yes        2
  72.       640x480    no        1
  73.       800x600    no        1
  74.  
  75.     * Works with: ATI, Cirrus, Everex, NCR, Oak-077, Primus 2000,
  76.       Paradise WD90c3x and VESA [v1.2+]
  77.  
  78.     o Fixed text clipping at right and bottom edges (1.1)
  79.  
  80.     o Various speed optimizations (line & solid bar) (1.1)
  81.  
  82.     o Added compile-time support for 8x8, 8x14, or 8x16 bitmap fonts (1.1)
  83.